package cn.dust.design.pattern.structural.composite.Military;

import java.util.Iterator;

public abstract class MilitaryPerson {
	String name;
	double salary;
	public MilitaryPerson(String name, double salary) {
		super();
		this.name = name;
		this.salary = salary;
	}
	public abstract void add(MilitaryPerson person) ;
    public abstract void remove(MilitaryPerson person) ;
    public abstract MilitaryPerson getChild(int index); 
    public abstract Iterator<MilitaryPerson> getAllChildren() ;
    public abstract boolean isLeaf();
    
    public double getSalary() {
    	return this.salary;
    }
    public void setSalary(double salary) {
    	this.salary = salary;
    }


}
